<template>
    <div id="checkConferenceDetail">
        <el-table :data="delailList" stripe style="width: 100%">
          <el-table-column prop="id" label="用户ID" width="270" />
          <el-table-column prop="name" label="用户名" width="100" />
          <el-table-column prop="admin" label="权限级别" width="90px">
            <template #default="scope">
              <el-tag
                :type="scope.row.admin ? 'primary' : 'info'"
                disable-transitions
                >{{ scope.row.admin ? "管理员" : "用户" }}
                </el-tag>
            </template>
          </el-table-column>
          <el-table-column prop="phone" label="联系电话" width="120px" />
          <el-table-column prop="sad" label="伤心" width="55px" />
          <el-table-column prop="angry" label="愤怒" width="55px" />
          <el-table-column prop="surprise" label="惊喜" width="55px" />
          <el-table-column prop="fear" label="恐惧" width="55px" />
          <el-table-column prop="happy" label="开心" width="55px" />
          <el-table-column prop="disgust" label="厌恶" width="55px" />
          <el-table-column prop="neutral" label="平淡" width="55px" />
        </el-table>
    </div>
  </template>
  
  <script>
  import axios from "axios";
  import { baseUrl } from "../main.js";
  import { show_success_msg, show_error_msg } from "../js/msg.js";
  export default {
    props: {
        checkConferenceDetailId: String,
    },
    data() {
      return {
        baseUrl: baseUrl,
        delailList: [],
      };
    },
    methods: {
        getUDetailByConferenceId() {
        axios
            .get(this.baseUrl +
                "/ConferenceDetail/getDetailByConferenceId?conferenceId=" + 
                this.checkConferenceDetailId
            )
            .then((response) => {
            let re_data = response.data;
            if (re_data.status == 200) {
                this.delailList = re_data.data;
            } else {
                show_error_msg("获取详细信息失败", re_data.msg);
            }
            })
            .catch((error) => {
            show_error_msg("获取详细信息失败", "无法与服务建立连接");
            });
        },
    },
    mounted() {
        this.getUDetailByConferenceId();
    },
  };
  </script>
  
  <style scoped>
  #editUser > #userData {
    margin-top: 12px;
  }
  
  #buttons {
    margin-top: 2vh;
  }
  </style>